$(function(){
	var len = $(".slider-container ul li").length;
	var i = 0;
	var wid = $(".slider-container li").width();
	var slider = $(".slider-container");
	var clone = $(".slider-container ul li:first").clone();
	console.log(clone);
	$(".slider-container ul").append(clone);

	$(".r-btn").click(function(){
		if(!slider.is(":animated")){
			i++;
			if(i==len+1){
				$(".slider-container").css({left:0});
				console.log($(".slider-container").css("left"));
				i = 1;
			}
			$(".slider-container").animate({left: -wid*i});
		}
	})
	$(".l-btn").click(function(){
		if(!slider.is(":animated")){
			i--;
			if(i== -1){
				$(".slider-container").css({left:-wid*len});
				console.log($(".slider-container").css("left"));
				i = len - 1;
			}
			$(".slider-container").animate({left: -wid*i});
		}
	})
})